package gjson

import (
	"encoding/json"
)

// json -> struct/map, dst should be ptr
func Json2StructOrMap(raw string, dst interface{}) {
	_ = json.Unmarshal([]byte(raw), &dst)
}

// struct/map -> json
func StructOrMap2Json(src interface{}) string {
	data, _ := json.Marshal(src)
	return string(data)
}
